<template>
  <div>
    <router-view :active="active" @cc="func"/>
    <!-- //底部标签栏 -->
    <van-tabbar
      fixed
      v-model="active"
      active-color="#1989FA"
      inactive-color="#b3b3b3"
    >
      <van-tabbar-item icon="wap-home" to="/">首页</van-tabbar-item>
      <van-tabbar-item icon="shop" to="/uuu">点餐</van-tabbar-item>
      <van-tabbar-item icon="column" to="/dingdan">订单</van-tabbar-item>
      <van-tabbar-item icon="manager" to="/me">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
export default {
  data() {
    return {
       active: 0,
    };
  },
  methods:{
    func(ac){
      this.active=ac;
    }
  }
};
</script>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  padding: 30px;
}

#nav a {
  font-weight: bold;
  color: #2c3e50;
}

#nav a.router-link-exact-active {
  color: #42b983;
}
</style>
